package com.dynabook.ems.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 
 * @TableName ems_my_borrow
 */
@TableName(value ="ems_my_borrow")
@Data
public class EmsMyBorrow implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "ems_request_id")
    @ApiModelProperty("请求ID")
    private String emsRequestId;

    /**
     * 样品编号
     */
    @TableField(value = "fixed_no")
    @ApiModelProperty("样品编号")
    private String fixedNo;

    /**
     * 借用人
     */
    @TableField(value = "user_name")
    @ApiModelProperty("借用人")
    private String userName;

    /**
     * 借用数量
     */
    @TableField(value = "borrow_num")
    @ApiModelProperty("借用数量")
    private Integer borrowNum;

    /**
     * 借用时间
     */
    @TableField(value = "borrow_time")
    @ApiModelProperty("借用时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date borrowTime;

    /**
     * 插入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "insert_time",fill = FieldFill.INSERT)
    private LocalDateTime insertTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 员工号
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 申请状态
     */
    @TableField(value = "request_status")
    private Integer requestStatus;

    /**
     * 是否工单借用 0不是 1是
     */
    @TableField(value = "is_work_order")
    @ApiModelProperty("是否工单借用")
    private Integer isWorkOrder;

    /**
     * 是否删除 0未删除  1 删除
     */
    @TableField(value = "is_delete")
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}